<template>
	<view>
	<block v-if="cat_item.name=='cat'||cat_item.cat_id==cat.id" v-for="(cat,cat_index) in cat_list" :key="cat.id">
		<view class="c-title-bar flex-y-center flex-x-center" v-if="cat.goods_list.length>0">
				<image mode="aspectFill" :src="cat.pic_url" v-if="cat.pic_url"></image>
				<navigator class="flex-y-center right" :url="'/pages/list/list?cat_id='+cat.id">
					<text style="margin-right:10upx;">查看更多</text>
					<image class="arrow" src="/static/images/new/icon-cat-more.png"></image>
				</navigator>
			</view>
		<view class="c-cat-wrapper" style="background:#fff;margin-bottom: 10upx;overflow-x: hidden;" v-if="cat.goods_list.length>0">
			
			<!-- <view class="title-bar flex-y-center flex-x-center">
				<view class="title-line"></view>
				<view class="title flex-y-center">
					<image mode="aspectFill" :src="cat.pic_url" v-if="cat.pic_url"></image>
					<text>{{cat.name}}</text>
				</view>
				<view class="title-line"></view>
				<navigator class="flex-y-center" :url="'/pages/list/list?cat_id='+cat.id">
					<text>更多</text>
					<image :src="__wxapp_img.dapp.jiantou_r.url"></image>
				</navigator>
			</view> -->
			<view :class="['goods-list flex-row', 'goods-list-cols-'+cat_goods_cols]" v-if="cat_goods_cols==1">
				<view class="products_container" v-for="(goods,goods_index) in cat.goods_list" :key="goods.id">
					<navigator class="products_item flex-row" :url="'/pages/goods/goods?id='+ goods.id">
						<view class="flex-grow-0 product_logo">
							<image class="product_logo" mode="aspectFill" :src="goods.pic_url"></image>
						</view>
						<view class="product_bd flex-grow-1 flex-col" style="margin-left:32upx;justify-content:space-between">
							<view class="text-more-2" style="margin-top:15upx;">{{goods.name}}</view>
							<view class="flex-row flex-y-center">
								<view class="new_price flex-grow-1">
									<block v-if="goods.is_negotiable!=1">￥</block>{{goods.price}}
								</view>
								<view class="sales_price flex-grow-0" v-if="__is_sales">已售{{goods.sales}}</view>
							</view>
						</view>
					</navigator>
					<view style="position:absolute;width:95%" v-if="false">
						<image catchtap="showshop" class="toCart" :data-id="goods.id" :src="__wxapp_img.dapp.home_gwc.url"></image>
					</view>
				</view>
			</view>
			<view :class="['goods-list flex-row', 'goods-list-cols-'+cat_goods_cols]" v-else>
				<view class="flex-grow-0" v-for="(goods,goods_index) in cat.goods_list" :key="goods.id">
					<form @submit="$emit('_formIdSubmit',$event)" data-bind="myBtnClick" data-type="navigate" :data-url="'/pages/goods/goods?id='+goods.id" reportSubmit="true">
						<button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
							<navigator class="goods-item" url="">
								<image mode="aspectFill" :src="goods.pic_url"></image>
								<text :class="['text-more-2',cat_goods_cols==3?'fs-sm':'']" style="color:#353535;margin-top:15upx;padding:0 20upx;">{{goods.name}}
								</text>
								<text class="goods-price" v-if="cat_goods_cols==3">
									<block v-if="goods.is_negotiable!=1">￥</block>{{goods.price}}
								</text>
								<view class="flex-row" style="padding:10upx 20upx" v-else>
									<view class="flex-grow-1" style="color:#ff4544">
										<block v-if="goods.is_negotiable!=1">￥</block>{{goods.price}}
									</view>
									<view class="fs-sm flex-y-center" style="color:#999999;" v-if="__is_sales">已售{{goods.sales}}</view>
								</view>
							</navigator>
						</button>
					</form>
				</view>
			</view>
		</view>
	</block>
	</view>
</template>

<script>var myVue = {};
	export default {
		props: ['cat_list','__wxapp_img','cat_goods_cols','__is_sales','cat_item'],
		data() {
			return {
				
			};
		}
	}
</script>

<style scoped>
</style>
